/**
 * Created by LangK on 2016/12/19.
 */

export default [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    redirect: '/home/management/account'
  },
  {
    path: '/home/management',
    redirect: '/home/management/account'
  },
  {
    path: '/home/job',
    redirect: '/home/job/addJob'
  },
  {
    path: '/home/eventForw',
    redirect: '/home/eventForw/eventHeadle'
  },
  {
    path: '/login',
    component: function (resolve) {
      require(['./components/Login.vue'], resolve)
    }
  },
  {
    path: '/home',
    component: function (resolve) {
      require(['./components/Home.vue'], resolve)
    },
    children: [
      {
        path: 'management',
        component: function (resolve) {
          require(['./components/management/management.vue'], resolve)
        },
        children: [
          {
            path: 'account',
            component: function (resolve) {
              require(['./components/management/account.vue'], resolve)
            }
          },
          {
            path: 'resource',
            component: function (resolve) {
              require(['./components/management/resource.vue'], resolve)
            }
          },
          {
            path: 'role',
            component: function (resolve) {
              require(['./components/management/role.vue'], resolve)
            }
          }
        ]
      },
      {
        path: 'job',
        component: function (resolve) {
          require(['./components/job/job.vue'], resolve)
        },
        children: [
          {
            path: 'awaitJob',
            component: function (resolve) {
              require(['./components/job/awaitJob.vue'], resolve)
            }
          },
          {
            path: 'cronJob',
            component: function (resolve) {
              require(['./components/job/cronJob.vue'], resolve)
            }
          },
          {
            path: 'executiveJob',
            component: function (resolve) {
              require(['./components/job/executiveJob.vue'], resolve)
            }
          },
          {
            path: 'unusualJob',
            component: function (resolve) {
              require(['./components/job/unusualJob.vue'], resolve)
            }
          },
          {
            path: 'addJob',
            component: function (resolve) {
              require(['./components/job/addJob.vue'], resolve)
            }
          },
          {
            path: 'listJob',
            component: function (resolve) {
              require(['./components/job/listJob.vue'], resolve)
            }
          }
        ]
      },
      {
        path: 'incidentCenter',
        component: function (resolve) {
          require(['./components/incidentCenter/incidentCenter.vue'], resolve)
        }
      },
      {
        path: 'eventForw',
        component: function (resolve) {
          require(['./components/eventForw/eventForw.vue'], resolve)
        },
        children: [
          {
            path: 'eventHeadle',
            component: function (resolve) {
              require(['./components/eventForw/eventHeadle.vue'], resolve)
            }
          }
        ]
      },
      {
        path: 'log',
        component: function (resolve) {
          require(['./components/log/log.vue'], resolve)
        }
      }
    ]
  }
]
